;---------------------------------------------------------------------------
;Earthquake
[Statedef 3000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000

[State 3000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = (ceil(-1*const(size.yscale))),(ceil(-27*const(size.yscale)))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3000, 4]
type = HitDef
Trigger1 = P2MoveType != H && AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
attr = S, HT
hitflag = M-
priority = 1, Miss
getpower = 0
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 3001
p2stateno = 3005
guard.dist = 0
fall = 1
fall.recovertime = 1
numhits = 0

[State 3000, 5]
type = NotHitBy
trigger1 = Time < 5
value = SCA
time = 1

[State 3000, 7]
type = StateTypeSet
trigger1 = AnimElem = 3
trigger2 = Time = 31
movetype = I

[State 3000, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 1 && TeamSide = 1
anim = 8038
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3000, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 1 && TeamSide = 2
anim = 8038
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3000, 11]
type = PlaySnd
trigger1 = AnimElem = 2
value = F720,0

[State 3000, 12]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 3000, 13]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Earthquake (Jump)
[Statedef 3001]
type    = S
movetype= A
physics = N
anim = 3001
ctrl = 0
sprpriority = -3
hitcountpersist = 1

[State 3001, 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = 18*const(size.xscale),0

[State 3001, 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 2*const(size.xscale), -38*const(size.yscale)

[State 3001, 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = -7*const(size.xscale),-46*const(size.yscale)

[State 3001, 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -18*const(size.xscale), -48*const(size.yscale)

[State 3001, 5]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && target,StateNo = 3005 && ScreenPos Y > -20
pos = -20*const(size.xscale),-46*const(size.yscale)

[State 3001, 5]
type = TargetBind
triggerall = NumTarget && ScreenPos Y <= -20
trigger1 = target,StateNo = 3005
pos = -8*const(size.xscale),-46*const(size.yscale)

[State 0, SprPriority]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[State 3001, 6]
type = VelSet
trigger1 = AnimElem = 4
x = Cond(FrontEdgeBodyDist < 45,FrontEdgeBodyDist/10,4.5)
y = (20 - ScreenPos Y)/10

[State 3001, 7]
type = Null
triggerall = Pos X > 0 && Facing = 1 || Pos X < 0 && Facing = -1
trigger1 = AnimElem = 4

[State 3001, 8]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A

[State 3001, 9]
type = ScreenBound
trigger1 = 1
value = 0

[State 3001, 10]
type = VelSet
trigger1 = ScreenPos Y <= -20
x = 0
y = 0

[State 3001, 11]
type = PosSet
trigger1 = ScreenPos Y <= -20
y = -280

[State 3001, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1150,0

[State 3001, 13]
type = PlaySnd
triggerall = NumTarget
trigger1 = target,StateNo = 3006 && target,Time = 5
value = S3000,0
persistent = 0

[State 3001, 14]
type = TargetState
triggerall = NumTarget
trigger1 = ScreenPos Y <= -20
value = 3006
persistent = 0

[State 3001, 15]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 3001, 16]
type = ChangeState
triggerall = NumTarget
trigger1 = target,StateNo = 3007
value = 3002

;---------------------------------------------------------------------------
;Earthquake (Fall)
[Statedef 3002]
type    = A
movetype= A
physics = N
anim = 3002
velset = 0, 6.3
ctrl = 0
sprpriority = 2
hitcountpersist = 1

[State 3002, 1]
type = PlaySnd
trigger1 = !Time
value = S40,0

[State 3002, 2]
type = VelAdd
trigger1 = 1
x = 0
y = .44*const(size.yscale)

[State 3002, 3]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && P2Dist Y <= 12
time = 1
pos = -8,12*const(size.yscale)

[State 3002, 4]
type = TargetState
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && P2Dist Y <= 12
value = 3008
persistent = 0

[State 3002, 5]
type = PlaySnd
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && P2Dist Y <= 12
value = F5,3
persistent = 0

[State 3002, 6]
type = Explod
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && P2Dist Y <= 12
anim = 6001
ID = 3000
pos = 1,-2
postype = p1
removetime = -2
scale = 1,1
sprpriority = 5
ownpal = 1
persistent = 0

[State 3002, 7]
type = ChangeState
triggerall = NumTarget
trigger1 = target,StateNo = 3009
value = 3003
;---------------------------------------------------------------------------
;Earthquake (Fall)
[Statedef 3003]
type    = A
movetype= A
physics = N
anim = 3003
velset = 0, 0
ctrl = 0
sprpriority = 2

[State 3003, 1]
type = PlaySnd
trigger1 = Anim = 3003 && Animelem = 3
value = S40,0

[State 3003, 2]
type = ChangeAnim
trigger1 = Anim = 3003 && !AnimTime 
value = 43

[State 3003, 3]
type = VelSet
trigger1 = Anim = 43 && AnimElem = 1
x = -2.1*const(size.xscale)
y = -4.1*const(size.yscale)
persistent = 1

[State 3003, 4]
type = StateTypeSet
trigger1 = Anim = 43 && AnimElem = 1 
physics = A
persistent = 1

[State 3003, 5]
type = PlaySnd
trigger1 = !Time
value = F7,2

[State 3003, 6]
type = PlayerPush
trigger1 = 1
value = 0

[State 3003, 7]
type = TargetLifeAdd
trigger1 = !Time
value = ceil(-300*FVar(20))

[State 3004, 8]
type = VarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 300
ignorehitpause = 1

[State 3303, 9]
type = VarAdd
trigger1 = !Time && Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3000, 10]
type = RemoveExplod
trigger1 = Anim = 43 && AnimElem = 1
id = 8030
;---------------------------------------------------------------------------
;Caught in Earthquake
[Statedef 3005]
type    = A
movetype= H
physics = N
poweradd = 200
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3005, 1]
type = ChangeAnim2
trigger1 = !Time
value = 3005

[State 3005, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 3005, 3]
type = SelfState
trigger1 = !gethitvar(isbound) && Time < 5
value = 5050
;---------------------------------------------------------------------------
;Caught in Earthquake
[Statedef 3006]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3006, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 3006, 2]
type = ChangeAnim2
trigger1 = !Time
value = 3006

[State 3006, 3]
type = VelSet
trigger1 = Time = 15
y = 8.6

[State 3006, 4]
type = VelAdd
trigger1 = Time >= 15
y = .44

[State 3006, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 3007

;---------------------------------------------------------------------------
;Ground Bounce
[Statedef 3007]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3007, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 3007, 2]
type = PosSet
trigger1 = !Time
y = 0

[State 3007, 3]
type = ChangeAnim
trigger1 = !Time
value = 5100

[State 3007, 3]
type = ChangeAnim
trigger1 = Time = 10
value = 5160

[State 3007, 4]
type = VelSet
trigger1 = Time = 10
x = 0
y = -7.7

[State 3007, 5]
type = PlaySnd
trigger1 = !Time
value = F7,2

[State 3007, 6]
type = EnvShake
trigger1 = !Time
time = 10
freq = 90
ampl = -15

[State 3007, 7]
type = VelAdd
trigger1 = Time >= 10
y = .44

[State 3007, 8]
type = LifeAdd
trigger1 = !Time
value = -50
kill = 0

;---------------------------------------------------------------------------
;Ground Bounce
[Statedef 3008]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3008, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 3008, 2]
type = ChangeAnim
trigger1 = !Time
value = 5100

[State 3008, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -18
value = 3009

;---------------------------------------------------------------------------
;Ground Bounce
[Statedef 3009]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3009, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 3009, 2]
type = PlaySnd
trigger1 = !Time
value = S7,1

[State 3009, 3]
type = EnvShake
trigger1 = !Time
time = 20
freq = 120
ampl = -45

[State 3009, 4]
type = ChangeAnim
trigger1 = Life && Time = 25
value = 5110

[State 3009, 5]
type = VelSet
trigger1 = Life && Time = 43
x = -2.1

[State 3009, 6]
type = ChangeState
trigger1 = Life && Time = 43
value = 3010
 
[State 1153, 6]
type = Null
trigger1 = Life && Time = 85
value = 5120
 
[State 3009, 7]
type = SelfState
trigger1 = !Life
value = 5610
;---------------------------------------------------------------------------
;Ground Bounce
[Statedef 3010]
type    = A
movetype= H
physics = N
velset = -2.1,-4.5
ctrl = 0
sprpriority = -2

[State 3010, 1]
type = ChangeAnim
trigger1 = !Time
value = 5160

[State 3010, 2]
type = VelAdd
trigger1 = 1
y = .44

[State 3010, 3]
type = PosSet
trigger1 = !Time
y = 20

[State 3010, 4]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && Pos Y >= 20
value = 5100
 
[State 1153, 6]
type = Null
trigger1 = Life && Time = 85
value = 5120
 
[State 727, 7]
type = Null
trigger1 = !Life
value = 5610
;---------------------------------------------------------------------------
;Super Driller
[Statedef 3050]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3050, 1]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = (ceil(-1*const(size.yscale))),(ceil(-27*const(size.yscale)))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3050, 2]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000
movetime = 1

[State 3050, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3050, 4]
type = VelSet
trigger1 = AnimElem = 2
x = 5.5*const(size.xscale)
y = 0

[State 3050, 5]
type = VelMul
trigger1 = Time > 10
x = .85

[State 3050, 6]
type = HitDef
trigger1 = AnimElem = 4 ;Var(5) < 10 && 
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 23,11
priority = 4,Hit
damage = ceil(40*Fvar(20)),10
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 28
guard.slidetime = 26
ground.hittime = 28
guard.hittime = 26
ground.velocity = 0*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = 0, -1.6*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 0
fall.recovertime = 1
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3050, 7]
type = HitDef
;triggerall = (!HitCount && Var(5) < 10) || HitCount
trigger1 = AnimElem = 5 || AnimElem = 6 || AnimElem = 7 || AnimElem = 8 || AnimElem = 9 || AnimElem = 10
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 23,11
priority = 4,Hit
damage = ceil(40*Fvar(20)),10
pausetime = 8,8
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 14
guard.slidetime = 12
ground.hittime = 14
guard.hittime = 12
ground.velocity = -3.6*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = -3.6*const(size.xscale), -1.6*const(size.yscale)
yaccel = .35*const(size.yscale)
ground.cornerpush.veloff = ifelse((AnimElem = 8),-5.6*const(size.xscale) ,0)
fall = 0
fall.recovertime = 1
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3050, 8]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3050, 9]
type = StateTypeSet
trigger1 = AnimElem = 4
movetype = A

[State 3050, 10]
type = StateTypeSet
trigger1 = AnimElem = 11
movetype = I

[State 3050, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 2 && TeamSide = 1
anim = 8039
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3050, 12]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 2 && TeamSide = 2
anim = 8039
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3050, 13]
type = VarSet
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 10
ignorehitpause = 1

[State 3050, 14]
type = ChangeState
trigger1 = NumTarget && MoveHit
value = 3051
ignorehitpause = 1

[State 3050, 15]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 3050, 16]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Super Driller
[Statedef 3051]
type    = S
movetype= A
physics = N
velset = 5.5*const(size.xscale),0
anim = 3051
ctrl = 0
sprpriority = 2
hitcountpersist = 1

[State 3051, 1]
type = VelMul
trigger1 = Time < 5
x = .85

[State 3051, 2]
type = HitDef
;triggerall = (!HitCount && Var(5) < 10) || HitCount
trigger1 = AnimElem = 4 || AnimElem = 5 || AnimElem = 6 || AnimElem = 7 || AnimElem = 8 || AnimElem = 9 || AnimElem = 10
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = Medium
getpower = 0,0
givepower = 23,11
priority = 4,Hit
damage = ceil(15*Fvar(20)),4
pausetime = 8,8
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-17*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 14
guard.slidetime = 12
ground.hittime = 14
guard.hittime = 12
ground.velocity = -1.6*const(size.xscale)
air.type = Low
air.hittime = 100
air.velocity = -1.2*const(size.xscale), -1.6*const(size.yscale)
yaccel = .35*const(size.yscale)
ground.cornerpush.veloff = ifelse((AnimElem = 8),-5.6*const(size.xscale) ,0)
fall = 0
fall.recovertime = 1
id = 1100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3051, 4]
type = VelSet
trigger1 = AnimElem = 11
x = 0

[State 3051, 5]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 3051, 6]
type = PlaySnd
trigger1 = AnimElem = 12
value = F720,0

[State 3051, 7]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
var(5) = 10
ignorehitpause = 1

[State 3051, 8]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 3051, 9]
type = ChangeState
trigger1 = !AnimTime
value = 3052
;---------------------------------------------------------------------------
;Super Driller
[Statedef 3052]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 3052
ctrl = 0
sprpriority = 2
hitcountpersist = 1

[State 3052, 1]
type = HitDef
trigger1 = !Time
attr = S,HA
hitflag = MAF
guardflag = MA
animtype = Up
priority = 4,Hit
getpower = 0,0
givepower = 23,11
damage = ceil(60*Fvar(20)),15
pausetime = 16,16
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-31*const(size.yscale))
hitsound = F5,4
guardsound = F6,0
ground.type = High
ground.slidetime = 28
guard.slidetime = 26
ground.hittime = 28
guard.hittime = 26
ground.velocity = -.35*const(size.xscale),-7.5*const(size.yscale)
guard.velocity = -2.8*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -2.8*const(size.xscale), -4.3*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 1
fall.recover = 0
fall.recovertime = 1
id = 3052
chainID = -1
nochainID = -1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 3052, 2]
type = PlaySnd
trigger1 = !Time
value = F0,3

[State 3052, 3]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Jackhammer Drop
[Statedef 3100]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 3100
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3100, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 32
sound = F8020, 0
darken = 0
poweradd = -1000

[State 3100, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = (ceil(-1*const(size.yscale))),(ceil(-27*const(size.yscale)))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 3100, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 32
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 3100, 4]
type = HitDef
Trigger1 = (!HitCount && Var(5) < 10) || HitCount && !Time
attr = A, HT
hitflag = AF
priority = 1, Miss
getpower = 0
sparkno = -1
p1sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 3101
p2stateno = 3103
guard.dist = 0
fall = 1
fall.recovertime = 1
numhits = 0

[State 3100, 5]
type = NotHitBy
trigger1 = Time < 5
value = SCA
time = 1

[State 3100, 6]
type = StateTypeSet
trigger1 = Anim = 3100 && AnimElem = 3 
statetype = A
movetype = A

[State 3100, 7]
type = VarSet
trigger1 = !Time
var(10) = Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0)

[State 3100, 8]
type = VelSet
trigger1 = Anim = 3100 && AnimElem = 3 
x = (2.5+5*Var(10))*const(size.xscale);7.5 5.5
y = -8.7 *const(size.yscale)

[State 3100, 9]
type = VelAdd
;triggerall = Anim = 3100
trigger1 = Time > 6 && Vel X != 0
x = (-.125-.250*Var(10))*const(size.xscale);-.375 -.275
y = .44*const(size.yscale)

[State 3100, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 1 && TeamSide = 1
anim = 8040
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3100, 11]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 1 && TeamSide = 2
anim = 8040
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 3100, 12]
type = ChangeAnim
trigger1 = Anim = 3100 && Time = 18
value = 40

[State 3100, 13]
type = VelSet
trigger1 = Anim = 40 && AnimElem = 1
x = 0
y = 0

[State 3100, 14]
type = ChangeAnim
trigger1 = Anim = 40 && !AnimTime
value = 41

[State 3100, 15]
type = VelAdd
trigger1 = Anim = 41
y = .44*const(size.yscale)

[State 3100, 16]
type = PlaySnd
trigger1 = Anim = 3100 && AnimElem = 2
value = S3100,0

[State 3100, 17]
type = RemoveExplod
trigger1 = Time = 19
id = 8030

[State 1005, 12]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && AnimElemTime(7) >= 0
value = 1009
;---------------------------------------------------------------------------
;Jackhammer Drop
[Statedef 3101]
type    = S
movetype= A
physics = N
velset = 0,-9.5*const(size.yscale)
anim = 3101
ctrl = 0
sprpriority = -3

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
y = -6.5*const(size.yscale)

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 11
y = 4*const(size.yscale)

[State 3001, 2]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = 4*const(size.xscale), -36*const(size.yscale)

[State 3001, 2]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 3*const(size.xscale), -33*const(size.yscale)

[State 3001, 3]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = -6*const(size.xscale),-46*const(size.yscale)

[State 3001, 4]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -14*const(size.xscale), -48*const(size.yscale)

[State 3001, 5]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = -19*const(size.xscale),-35*const(size.yscale)

[State 3001, 6]
type = TargetBind
triggerall = NumTarget
trigger1 = AnimElem = 6
pos = 2*const(size.xscale),10*const(size.yscale)

[State 3001, 7]
type = TargetState
triggerall = NumTarget
trigger1 = AnimElem = 6
value = 3104

[State 3001, 8]
type = SprPriority
trigger1 = AnimElem = 5
value = -1 
 
[State 3001, 8]
type = SprPriority
trigger1 = AnimElem = 6
value = -3 
 
[State 3102, 9]
type = PlaySnd
trigger1 = !Time
value = S1000,1

[State 3102, 10]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 3102, 11]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -12
value = 3102
;---------------------------------------------------------------------------
;Jackhammer Drop
[Statedef 3102]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 3102
ctrl = 0
sprpriority = 2

[State 3102, 1]
type = PosSet
trigger1 = !Time
y = -12*const(size.yscale)

[State 3102, 2]
type = TargetState
trigger1 = NumTarget && !Time
value = 3106

[State 3102, 3]
type = Explod
trigger1 = !Time
anim = 6001
ID = 3102
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3
ontop = 0
ownpal = 1
removeongethit = 0

[State 3102, 4]
type = Explod
trigger1 = (Time > 20 && Time <= 248) && (Time % 8) = 4
anim = 6000
ID = 3102
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 3
ontop = 0
ownpal = 1
removeongethit = 0

[State 3102, 5]
type = VelSet
trigger1 = AnimElem = 63
x = 3.2*const(size.xscale)
y = -5.5*const(size.yscale)

[State 3102, 6]
type = StateTypeSet
trigger1 = AnimElem = 63
statetype = A
physics = A

[State 3102, 7]
type = TargetState
trigger1 = NumTarget && AnimElem = 59
value = 3107

[State 3102, 8]
type = PlaySnd
trigger1 = (Time >= 20 && Time <= 248) && (Time % 8) = 4
value = F5,1

[State 3102, 95]
type = PlaySnd
trigger1 = !Time
value = F7,2

[State 3102, 10]
type = PlaySnd
trigger1 = !Time
value = F5,2

[State 3102, 11]
type = PlaySnd
trigger1 = AnimElem = 2
value = S190,0
channel = 4

[State 3102, 12]
type = PlaySnd
trigger1 = AnimElem = 63
value = S40,0

[State 3102, 13]
type = StopSnd
trigger1 = AnimElem = 62
channel = 4

[State 3102, 14]
type = EnvShake
trigger1 = Time = 20
time = 224
freq = 120
ampl = -1

[State 3102, 15]
type = VarAdd
trigger1 = Time = 20 && Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 3102, 16]
type = HitAdd
trigger1 = (Time >= 20 && Time <= 248) && (Time % 8) = 4
trigger2 = NumTarget && !Time
value = 1

[State 3102, 17]
type = TargetLifeAdd
trigger1 = NumTarget && !Time
value = ceil(-10*fvar(20))
kill = 0

[State 3102, 18]
type = TargetLifeAdd
triggerall = NumTarget
trigger1 = (Time >= 20 && Time <= 248) && (Time % 8) = 4
value = ceil(-10*fvar(20))
kill = 1

[State 3004, 19]
type = VarSet
triggerall = NumTarget && RoundState = 3
trigger1 = WinKO
var(28) = 310
ignorehitpause = 1

[State 3100, 20]
type = RemoveExplod
trigger1 = AnimElem = 62
id = 8030

;---------------------------------------------------------------------------
;Caught in Jackhammer
[Statedef 3103]
type    = A
movetype= H
physics = N
poweradd = 200
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3103, 1]
type = ChangeAnim2
trigger1 = !Time
value = 3103

[State 3103, 2]
type = ScreenBound
trigger1 = 1
value = 0

;---------------------------------------------------------------------------
;Caught in Earthquake
[Statedef 3104]
type    = A
movetype= H
physics = N
velset = 0,6
ctrl = 0
sprpriority = -2

[State 3104, 1]
type = ChangeAnim2
trigger1 = !Time
value = 3104

[State 3104, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 3104, 3]
type = VelAdd
trigger1 = 1
y = .44

[State 3104, 4]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 3105

;---------------------------------------------------------------------------
;Caught in Earthquake
[Statedef 3105]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3105, 1]
type = ChangeAnim2
trigger1 = !Time
value = 3105

[State 3105, 2]
type = PosSet
trigger1 = !Time
y = 0

[State 3105, 3]
type = PlaySnd
trigger1 = !Time
value = F7,0

[State 3105, 4]
type = ScreenBound
trigger1 = 1
value = 0

;---------------------------------------------------------------------------
;Caught in Earthquake
[Statedef 3106]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3106, 1]
type = ChangeAnim2
trigger1 = !Time
value = 3106

[State 3106, 2]
type = ScreenBound
trigger1 = 1
value = 0

;---------------------------------------------------------------------------
;Caught in Earthquake
[Statedef 3107]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 3107, 1]
type = ChangeAnim2
trigger1 = !Time
value = 3107

[State 3107, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 3107, 3]
type = SelfState
trigger1 = !AnimTime
value = 5120
;---------------------------------------------------------------------------
;Pump And Blow
[Statedef 4000]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 4000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 4000, 1]
type = SuperPause
trigger1 = !Time
anim = -1
time = 40
sound = F8020, 1
darken = 0
poweradd = -3000
movetime = 20

[State 4000, 2]
type = Helper
trigger1 = !Time
name = "Super Helper"
ID = 6002
stateno = 6002
pos = ceil(12*const(size.xscale)),ceil(-34*const(size.yscale))
postype = p1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 4000, 3]
type = Explod
trigger1 = !Time
anim = F6003
ID = 6002
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 40
supermovetime = 999
pausemovetime = 999
scale = 1,1
sprpriority = -990
ownpal = 1
removeongethit = 1

[State 4000, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 21 && TeamSide = 1
anim = 8041
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 4000, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = Time = 21 && TeamSide = 2
anim = 8041
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 4000, 6]
type = Helper
trigger1 = AnimElemTime(6) = 1
name = "Hook"
ID = 4000
stateno = 4010
pos = ceil(29*const(size.xscale)),ceil(-16*const(size.yscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 4000, 7]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 4000, 8]
type = PlaySnd
trigger1 = AnimElem = 6
value = S1000,0

[State 4000, 9]
type = NotHitBy
trigger1 = Cond(NumHelper(4000),helper(4000),NumTarget,0)
value = SCA
time = 1

[State 4000, 10]
type = ChangeState
triggerall = NumHelper(4000)
trigger1 = helper(4000), NumTarget && enemynear(0),StateNo = 4002
value = 4001
ignorehitpause = 1

[State 4000, 11]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Pump And Blow
[Statedef 4001]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 4001
ctrl = 0
sprpriority = 2

[State 4001, 1]
type = PlaySnd
trigger1 = !Time || AnimElem = 3 || AnimElem = 5
value = S181,3

[State 4001, 2]
type = PlaySnd
trigger1 = AnimElem = 7
value = S1000,1

[State 4001, 3]
type = PlaySnd
trigger1 = AnimElem = 7
value = F5,4

[State 4010, 4]
type = VarSet
triggerall = RoundState = 3
trigger1 = WinKO
var(28) = 400
ignorehitpause = 1

[State 4001, 4]
type = VarSet
trigger1 = WinKO
var(4) = 1

[State 4001, 5]
type = VarSet
trigger1 = !Time
var(5) = 10

[State 4001, 6]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Inflated
[Statedef 4002]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 4002, 1]
type = ChangeAnim2
trigger1 = !Time && SelfAnimExist(5620)
value = 5620

[State 4002, 2]
type = ChangeAnim2
trigger1 = !Time && !SelfAnimExist(5620)
value = 4002

[State 4002, 3]
type = AngleDraw
trigger1 = AnimElemTIme(2) >= 0 && AnimElemTime(3) < 0 && Anim = 4002
value = 1
scale = 1.2,1.2

[State 4002, 4]
type = AngleDraw
trigger1 = AnimElemTime(3) >= 0 && Anim = 4002
value = 1
scale = 1.5,1.5

[State 4002, 5]
type = ChangeState
trigger1 = Alive && !AnimTime
value = 4003

;---------------------------------------------------------------------------
;POP
[Statedef 4003]
type    = S
movetype= H
physics = N
ctrl = 0
sprpriority = -2

[State 4003, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 4003, 2]
type = VelSet
trigger1 = (Life || !SelfAnimExist(5620)) && !Time
y = 8.9

[State 4003, 3]
type = PosSet
trigger1 = (Life || !SelfAnimExist(5620)) && !Time 
y = -850

[State 4003, 4]
type = VelAdd
trigger1 = Life || !SelfAnimExist(5620)
y = .6

[State 4003, 5]
type = ChangeAnim
trigger1 = (Life || !SelfAnimExist(5620)) && !Time
value = 5050

[State 4003, 6]
type = SelfState
trigger1 = (Life || !SelfAnimExist(5620)) && Vel Y > 0 && Pos Y > -Vel Y
value = 5100

[State 0, ChangeState]
type = ChangeState
trigger1 = !Life && SelfAnimExist(5620)
value = 4004

;---------------------------------------------------------------------------
;POP
[Statedef 4004]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 4004, 1]
type = ChangeAnim2
trigger1 = !Time
value = 5621

[State 4004, 2]
type = PosSet
trigger1 = Anim = 5621 && !AnimTime
y = 999

[State 0, SelfState]
type = SelfState
trigger1 = Anim = 5621 && !AnimTime
value = 5699

;---------------------------------------------------------------------------
;POP
[Statedef 4005]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 4005, 1]
type = SelfState
trigger1 = !Time
value = 5030
;-------------------------------------------------------------------------
;Hook
[Statedef 4010]
type    = S
movetype= A
physics = N
anim = 1020
ctrl = 0
velset = 16,0

[State 4010, 1]
type = PlaySnd
trigger1 = Vel X = 0
value = S181,2
persistent = 0

[State 4010, 2]
type = Explod
trigger1 = Time > 0 && Vel X > 0
anim = 911+1*(Time % 2 = 0)
ID = 1003
pos = ceil(-16*(Time)*const(size.xscale)),0
postype = p1
bindtime = -1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ignorehitpause = 1

[State 4010, 3]
type = HitDef
triggerall = parent,MoveType != H
trigger1 = parent,var(5) < 6 && !Time
attr = S, SA
damage = ceil(20*root,fvar(20)),5
animtype = Hard
getpower = 0
givepower = 300,150
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,2
sparkno = S6000
sparkxy = 0,0
hitsound = F5,1
guardsound = F6, 0
ground.type = Low
guard.slidetime = 15
guard.hittime  = 24
guard.velocity = -8
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -2.4,-3
air.hittime = 100
p2stateno = 4002
fall.recovertime = 1
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 0
guard.kill = 1
fall.kill = 1
numhits = 1

[State 4010, 4]
type = VelSet
trigger1 = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
x = 0
ignorehitpause = 1

[State 4010, 5]
type = VelSet
trigger1 = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
x = 0
ignorehitpause = 1

[State 4010, 1]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.2
ignorehitpause = 1
persistent = 0

[State 4010, 6]
type = RemoveExplod
trigger1 = Time = 10 && Vel X > 0
trigger2 = root,MoveType = H
trigger3 = parent,StateNo = 4001 && parent,AnimElem = 7
id = 1003
ignorehitpause = 1

[State 4010, 7]
type = TargetLifeAdd
trigger1 = parent,StateNo = 4001 && parent,AnimElem = 7
value = ceil((-520*root,fvar(21)))
kill = 1

[State 4010, 8]
type = TargetFacing
triggerall = NumTarget
trigger1 = Facing = target,Facing
value = -1

[State 4010, 9]
type = EnvColor
trigger1 = parent,StateNo = 4001 && parent,AnimElem = 7
value = 255,255,255
time = 1

[State 4010, 10]
type = TargetState
trigger1 = parent,MoveType = H
value = 4005

[State 4010, 11]
type = DestroySelf
trigger1 = Time = 10 && Vel X > 0
trigger2 = parent,MoveType = H
trigger3 = parent,StateNo = 4001 && parent,AnimElem = 7